home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2718 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.ifm.liu.se!d93marbl
  2. From: d93marbl@isy.liu.se (Martin Blom)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Passing arguments to a thread
  5. Date: 4 Feb 1996 11:37:24 GMT
  6. Message-ID: <4f25pk$aq2@newsy.ifm.liu.se>
  7. References: <4ed1eq$nfi@newsy.ifm.liu.se> <4elg30$695@sunsystem5.informatik.tu-muenchen.de>
  8. NNTP-Posting-Host: mut.isy.liu.se
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. X-Newsreader: NN version 6.5.0 #26 (NOV)
  13.  
  14. fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer) writes:
  15.  
  16.  
  17. >|> Is there a (nice) way to pass arguments to a new process?
  18. >|> Right now I allocate some memory and copy the following code:
  19. >|> Kick:
  20. >|>      lea    kick(pc),a1
  21. >|>      move.l #0,a0
  22. >Why not load a0 from a global var ?
  23.  
  24. I can't use global variables in a library.
  25.  
  26. >|>      jmp    ThreadStart
  27. >Isn't this rather a jmp (a0) ?
  28.  
  29. No. a0 is the argument I wish to pass to the thread.
  30.  
  31. >I don't know if I understood the problem right.
  32.  
  33. >You created a new task and want to pass args to it, with the code
  34. >beeing shared-lib code ?
  35.  
  36. Correct.
  37.  
  38. >Well, I'd use global vars. A library can have global vars, if I
  39. >understood right (I'd call intbase->activewindow a var global
  40. >for the intuilib).
  41.  
  42. >idea:
  43.  
  44. [deleted]
  45.  
  46. >Well, can it be done like that ? I bet normally it's done different
  47. >on Amiga, but would this work ?
  48.  
  49. I think it would work, but wouldn't that be even uglier than my current
  50. approach?
  51.  
  52.  
  53. --
  54.  +--------- Martin 'Leviticus' Blom ----------+    Commodore 128D 
  55.  | Linkoping Institute of Technology - Sweden |    Amiga 4000/040
  56.  +----------- lcs@lysator.liu.se -------------+
  57.                                   http://www.lysator.liu.se/~lcs/
  58.